#!/bin/bash

NGINX_PIDS=($(netstat -nuptl | grep -w nginx:  | awk '{print $7}' | awk -F '/' '{print $1}'))
[ ${#NGINX_PIDS[@]} -gt 0 ] && echo "need kill ${NGINX_PIDS[*]}" && kill -9 "${NGINX_PIDS[*]}"
